package cn.itcast.www.javascriptTest;

public class Utils {
	public static String utf8_encode(String input) {

		return "";
	}

	public static String Base64Encoding(String input) {
		String keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
		String output = null;
		input = utf8_encode(input);
		int chr1, chr2, chr3, enc1, enc2, enc3, enc4;
		int i = 0;
		while (i < input.length()) {
			chr1 = input.codePointAt(i++);
			chr2 = input.codePointAt(i++);
			chr3 = input.codePointAt(i++);

			enc1 = chr1 >> 2;
			enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
			enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
			enc4 = chr3 & 63;
		}

		return output;
	}
}